package com.guigu.eduservice.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 设备视频表（存储设备的展示视频，可选上传）
 * </p>
 *
 * @author Xiaosong
 * @since 2025-10-23
 */
@Data
@TableName("equipment_video")
public class EquipmentVideo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 视频唯一标识
     */
    @TableId(value = "video_id", type = IdType.AUTO)
    private Long videoId;

    /**
     * 关联设备表equipment_id（唯一，一个设备仅一个视频）
     */
    private Long equipmentId;

    /**
     * 视频URL（设备展示视频的存储地址）
     */
    private String videoUrl;

    /**
     * 视频名称（如"三一挖掘机操作演示.mp4"）
     */
    private String videoName;

    /**
     * 视频大小（单位：字节，用于限制视频上传大小）
     */
    private Long videoSize;

    /**
     * 记录创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 视频封面
     */
    private String thumbnail;
    public Long getVideoId() {
        return videoId;
    }

    public void setVideoId(Long videoId) {
        this.videoId = videoId;
    }

    public Long getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(Long equipmentId) {
        this.equipmentId = equipmentId;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getVideoName() {
        return videoName;
    }

    public void setVideoName(String videoName) {
        this.videoName = videoName;
    }

    public Long getVideoSize() {
        return videoSize;
    }

    public void setVideoSize(Long videoSize) {
        this.videoSize = videoSize;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "EquipmentVideo{" +
            "videoId = " + videoId +
            ", equipmentId = " + equipmentId +
            ", videoUrl = " + videoUrl +
            ", videoName = " + videoName +
            ", videoSize = " + videoSize +
            ", createTime = " + createTime +
        "}";
    }
}
